#include "pch.h"
#include "hid.h"

#include <stdio.h>
#include <memory.h>
#include <string.h>


uint8_t packet_buffer[32];


void get_hid_enable(uint16_t handle, uint8_t **pCmd, uint8_t *size)
{
	*size = 14;

	packet_buffer[0] = (uint8_t)handle;
	packet_buffer[1] = (uint8_t)(handle >> 8);
	packet_buffer[2] = *size - 4;
	packet_buffer[3] = 0x00;
	packet_buffer[4] = *size - 8;
	packet_buffer[5] = 0x00;
	packet_buffer[6] = 0xEE; /*hid command*/
	packet_buffer[7] = 0x00;

	packet_buffer[8] = 0x53;
	packet_buffer[9] = 0xF4;
	packet_buffer[10] = 0x42;
	packet_buffer[11] = 0x03;
	packet_buffer[12] = 0x00;
	packet_buffer[13] = 0x00;
	
	*pCmd = packet_buffer;
}